#ifndef _LULYUI_CHECKBOX_H_
#define _LULYUI_CHECKBOX_H_
#include <functional>

#include "../Image.h"
#include "UIObject.h"
class CheckBox : public UIObject {
 private:
  Image default_box_image;
  Image default_check_image;
  Image checked_check_image;
  Image current_box_image;
  Image current_check_image;
  void init() override;
  void event() override;
  void draw() override;
  void drawArea(const Rect& area) override;
  bool isChecked = false;
  std::function<void(bool)> onClicked_callback = [](bool isChecked) {};

 public:
  CheckBox(std::string uiObjectId, int x = 0, int y = 0);
  void onClicked(std::function<void(bool)> onClicked_callback);
};
#endif